Tips & techniques for Users of Sunsoft Solaris

April 1995

Modifying the Solaris Workspace Programs menu

Solaris provides a convenient graphical user interface that makes it easy for you to run the standard DeskSet applications. For instance, you don't have to remember the exact command needed to start Image Tool or Performance Meter--you simply open the Workspace menu, click Programs, and select the program you want to run from the Workspace Programs menu shown in Figure A. As convenient as this method is, wouldn't it be great if you could apply it to other applications?

In this article, we'll show you how Solaris allows you to modify the Workspace Programs menu. In addition, we'll show you how to add a new section to the menu for running your specific applications.

Editing the Programs menu

To make changes to the Programs menu, first open the Workspace menu (by holding the cursor over a blank area of the Workspace and clicking the left mouse button) and choose the Properties... option. When the Workspace Properties window appears, you can display several categories of configurable properties by clicking the Category button, as shown in Figure B.

From the Category menu, select the Programs Menu option. When you do so, the contents of the Workspace Properties window will change to a set of controls for customizing the Programs menu, as shown in Figure C.

At first, the top item in the menu is highlighted. You can move the highlight to another position in the menu by clicking on the entry at that position. You edit the menu by moving the highlight and then using the buttons on the right side of the window to perform an appropriate sequence of cut, copy, paste, and delete operations.

By using the controls on this window, you can modify, rearrange, or completely redefine the Programs menu. For instance, if there are some DeskSet applications that you never use, you can remove these entries from the Programs menu. Conversely, you can add new commands to the menu to launch other tasks that you do perform frequently.

Adding commands to the menu

Let's illustrate how you can edit the Programs menu by adding a new section between the Calendar Manager... and Command Tool... entries. We want to add two commands to this section and use blank entries to separate the section from the adjacent commands. To start, highlight the blank entry between the Calendar Manager... and Command Tool... entries, as shown in Figure D.

Next, click Copy to copy the current entry into a temporary buffer, click Paste Before to insert a copy of the entry at the current position, and click Paste After to insert a copy of the entry just after the current position. At this point, the menu contents should look like the ones in Figure E.

Now, you're ready to create an actual entry in the new section. Suppose the program you run most often isn't a DeskSet application, but the Mosaic program for accessing the World Wide Web on the Internet. So you can quickly run Mosaic whenever you want, let's add an entry for running the program.

To add an entry for Mosaic, use your mouse to activate the Label field and in this field type Mosaic..., which is the menu text for the entry. Next, press [Tab] to move to the Command field. In this field, type the command you normally use to start Mosaic. For the sake of discussion, let's assume the command you use is mosaic. Once you've entered the correct information in the Label and Command fields, click the Change button to see the new entry in the menu, as shown in Figure F.

Next, let's add another entry to the new section. However, this time instead of implementing a menu entry for a simple command like mosiac, let's create a menu item that requires several commands to complete. Many experienced Solaris users find that they frequently need to edit the .profile file in their home directory. Therefore, let's add a menu entry to streamline this task.

With the Workplace Properties window still open, highlight the Mosiac... entry, click the Copy button, and click the Paste After button. The menu should now have two Mosaic... entries.

To turn the second Mosaic... entry into an Edit Profile... entry, first activate the Label field and type Edit Profile... in the field. Then, type the command

cd $HOME; textedit .profile &

in the Command field. Finally, click Change to update the menu so it looks like the one shown in Figure G.

Saving your changes

Although the menu looks correct at this point, don't close the Workspace Properties window just yet or you'll lose all the changes you've made. In order to make the changes permanent, you must click the Apply button at the bottom of the window. When you do, Solaris updates the real Programs menu with the one you've just created.

Testing the menu

Anytime you make a change to the Programs menu, you should thoroughly test the menu's new functionality. This testing involves two steps: opening the menu to make sure all entries are in the proper locations and selecting the new menu items to make sure they perform the desired tasks. Furthermore, whenever you make extensive changes to the menu, it's good practice to test every item in the menu before you assume the menu is okay.

The Programs menu you just created should look like the one shown in Figure H. When you select the Mosaic... option, Mosaic should start (assuming, of course, you have installed Mosaic); when you select the Edit Profile... option, a Text Editor window containing a copy of your .profile file should open.

Conclusion

The Programs menu in Solaris provides an easy graphical method for launching frequently used programs. In this article, we've shown you how to add new commands to the Programs menu to launch programs other than the standard DeskSet applications.


[Return to Index for Inside Solaris - April Issue]

Copyright (c) 1995 The Cobb Group, a division of Ziff-Davis Publishing Company. All rights reserved.

Reproduction in whole or in part in any form or medium without express written permission of Ziff-Davis

Publishing Company is prohibited. The Cobb Group and The Cobb Group logo are trademarks of

Ziff-Davis Publishing Company.

Inside Solaris is a publication of The Cobb Group.
1-800-223-8720